<template>
  <!-- 选手名单 -->
  <div>
    <el-form class="pageWrap">
      <!-- <el-form-item label="报名日期" class="noBot"></el-form-item> -->
      <el-form-item label="赛事组别" class="noBot">
        <span
          :class="['span', gId == v.id ? 'active' : '']"
          v-for="(v, i) in groupArr"
          :key="i"
          @click="
            gId = v.id;
            getPlayers();
          "
          >{{ v.name }}</span
        >
      </el-form-item>
      <el-form-item label="报名来源" class="noBot">
        <span
          :class="['span', source == v.val ? 'active' : '']"
          v-for="(v, i) in sourceArr"
          :key="i"
          @click="
            source = v.val;
            getPlayers();
          "
          >{{ v.name }}</span
        >
      </el-form-item>
      <el-form-item label="报名状态" class="noBot">
        <span
          :class="['span', state == v.state ? 'active' : '']"
          v-for="(v, i) in stateArr"
          :key="i"
          @click="
            state = v.state;
            getPlayers();
          "
          >{{ v.name }}
          <el-tooltip
            class="item"
            effect="dark"
            v-if="v.tips"
            :content="v.tips"
            placement="bottom"
          >
            <i class="el-icon-info"></i>
          </el-tooltip>
        </span>
      </el-form-item>
    </el-form>
    <el-row class="pageWrap conmsg">
      <el-form :inline="true">
        <el-form-item class="noBot">
          <el-input placeholder="搜索选手姓名、手机号" v-model="name">
            <el-button
              slot="append"
              icon="el-icon-search"
              @click="getPlayers()"
            ></el-button>
          </el-input>
        </el-form-item>
        <el-form-item class="noBot">
          <el-dropdown @command="handleCommand" :hide-on-click="false">
            <el-button type="text" icon="el-icon-upload">导入名单</el-button>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item command="a">
                <!-- <el-link :underline="false" downlad="模板" target="_blank" href="./execl/model.xls">
                  <el-button type="text">导出模板</el-button>
                </el-link>-->
                <a href="./execl/model.xls" download="选手导入模板">导入模板</a>
              </el-dropdown-item>
              <el-dropdown-item command="b">
                <el-button type="text">导入名单</el-button>
              </el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </el-form-item>
        <el-form-item class="noBot">
          <el-button type="text" icon="el-icon-upload" @click="portTips"
            >导出名单</el-button
          >
        </el-form-item>
        <el-form-item class="noBot">
          <el-button
            type="text"
            icon="el-icon-plus"
            @click="aePerSonDialog = true"
            >添加单条选手</el-button
          >
        </el-form-item>
        <el-form-item class="noBot">
          <el-button type="text" @click="batchEntry = true"
            >批量生成参赛号</el-button
          >
          <el-tooltip class="item" effect="dark" placement="bottom">
            <div slot="content">
              由系统生成，为没有参赛号的选手生成参赛号
              <br />需先设置号牌规则 <br />如需分性别请确保性别已设置
            </div>
            <i class="el-icon-question"></i>
          </el-tooltip>
        </el-form-item>
      </el-form>
      <el-table
        ref="table"
        :data="playersList.slice((currP - 1) * PageS, currP * PageS)"
        style="width: 100%"
      >
        <el-table-column prop="姓名" label="姓名" width="180"></el-table-column>
        <!-- <el-table-column prop="手机号" label="手机号"></el-table-column> -->
        <el-table-column prop="entryNumber" label="参赛号"></el-table-column>
        <el-table-column prop="groupName" label="报名组别"></el-table-column>
        <el-table-column prop="sourceShow" label="报名平台"></el-table-column>
        <el-table-column prop="stateShow" label="报名状态"></el-table-column>
        <!-- <el-table-column prop="teamName" label="团队/家庭"></el-table-column> -->
        <el-table-column label="操作">
          <template slot-scope="{ row }">
            <el-popover placement="right" width="160" trigger="hover">
              <div>
                <el-button type="text" @click="showDEdit(row)"
                  >修改报名状态</el-button
                >
              </div>
              <div>
                <el-button type="text" @click="showSignEdit(row)"
                  >修改报名信息</el-button
                >
              </div>
              <div v-if="$orgId == 1">
                <el-button type="text" @click="delPer(row)"
                  >删除报名信息</el-button
                >
              </div>
              <div>
                <el-button type="text" @click="relieve(row)"
                  >解除绑定关系</el-button
                >
              </div>
              <el-button slot="reference" type="text" style="margin-right: 5px"
                >设置</el-button
              >
            </el-popover>
            <el-button type="text" @click="toogleExpand(row)"
              >查看信息</el-button
            >
          </template>
        </el-table-column>
        <el-table-column type="expand" width="1">
          <template slot-scope="props">
            <el-form label-position="left" inline class="table-expand">
              <el-form-item
                v-for="(v, k, i) in props.row.list"
                :key="i"
                :label="k + '：'"
              >
                <div v-if="k == '健康证明' || k == '完赛证明'">
                  <img
                    class="jtimg"
                    v-for="(vv, ii) in v"
                    :key="ii"
                    :src="vv"
                    v-showImgArr="{ list: v, ind: ii }"
                  />
                </div>
                <span v-else>{{ v }}</span>
              </el-form-item>
            </el-form>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        @size-change="(val)=>{PageS=val}"
        :current-page.sync="currP"
        :page-size="PageS"
        layout="sizes,prev, pager, next, jumper"
        :total="playersList.length"
        :page-sizes="[10,50, 100, 200]"
      ></el-pagination>
    </el-row>
    <el-dialog title="导入名单" :visible.sync="showUp">
      <el-form>
        <el-form-item label="选择组别：" required>
          <el-select v-model="upData.groupId" placeholder="请选择组别">
            <template v-for="(v, i) in groupArr">
              <el-option
                :key="i"
                :label="v.name"
                :value="v.id"
                v-if="v.id != 0"
              ></el-option>
            </template>
          </el-select>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-upload
          :action="upUrl"
          :on-success="upSuccess"
          :before-upload="beforeUpload"
          :show-file-list="false"
          :data="upData"
        >
          <el-button type="primary">导入名单</el-button>
        </el-upload>
      </div>
    </el-dialog>
    <el-dialog title="修改报名状态" :visible.sync="edit_d_State">
      <el-form>
        <el-form-item>正在修改 {{ editCon["姓名"] }} 的报名状态</el-form-item>
        <el-form-item label="原报名状态">{{ editCon.stateShow }}</el-form-item>
        <el-form-item label="现报名状态">
          <el-select v-model="editState" placeholder="请选择">
            <el-option label="审核通过" value="1"></el-option>
            <el-option label="审核不通过" value="4"></el-option>
            <el-option label="待审核" value="3"></el-option>
            <el-option label="已退赛" value="5"></el-option>
            <el-option label="取消参赛资格" value="7"></el-option>
            <el-option label="延期,确认参加" value="9"></el-option>
            <el-option label="延期,保留名额" value="10"></el-option>
            <el-option label="待退费" value="11"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button
            @click="
              edit_d_State = false;
              editCon = {};
            "
            >取消</el-button
          >
          <el-button type="primary" @click="saveEdit">确认</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <!-- 添加 / 修改 报名选手信息 -->
    <el-dialog
      title="添加 / 修改 选手信息"
      :visible.sync="aePerSonDialog"
      width="80%"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :show-close="false"
      v-if="aePerSonDialog"
    >
      <el-form :model="aePersonForm" label-width="100px">
        <el-form-item label="参加赛项">
          <el-select
            v-model="aePersonForm.groupId"
            placeholder="请选择"
            @change="getAddForm"
          >
            <template v-for="item in groupArr">
              <el-option
                v-if="item.id != 0"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              ></el-option>
            </template>
          </el-select>
        </el-form-item>
        <template v-for="(v, i) in aePersonForm.flist">
          <el-form-item
            v-if="v.definedType != 8 && v.definedType != 9"
            :label="v.name"
            :key="i"
            :required="v.must == 1"
          >
            <!-- definedType 1=>输入框 2=>手机号 3=>邮箱 4=>证件号 5=>单选 6=>普通下拉选择&&需设置值 7=>日期 8=>图片 9=>国籍选择 10=> 省市区选择 11=>证件类型 -->
            <el-input
              v-model="v.value"
              v-if="v.definedType == 1"
              placeholder="请输入"
              class="aePipt"
            ></el-input>
            <el-input
              v-model="v.value"
              v-if="v.definedType == 2"
              placeholder="请输入"
              class="aePipt"
            ></el-input>
            <el-radio-group v-model="v.value" v-if="v.definedType == 5">
              <el-radio label="男">男</el-radio>
              <el-radio label="女">女</el-radio>
            </el-radio-group>
            <el-input
              v-model="v.value"
              v-if="v.definedType == 3"
              placeholder="请输入"
              class="aePipt"
            ></el-input>
            <el-select
              v-model="v.value"
              placeholder="请选择"
              v-if="v.definedType == 11"
              class="aePipt"
            >
              <el-option
                v-for="(item, ind) in v.options"
                :key="ind"
                :label="item"
                :value="item"
              ></el-option>
            </el-select>
            <el-input
              v-model="v.value"
              v-if="v.definedType == 4"
              placeholder="请输入"
              class="aePipt"
            ></el-input>
            <el-select
              v-model="v.value"
              placeholder="请选择"
              v-if="v.definedType == 6"
              class="aePipt"
            >
              <el-option
                v-for="(item, ind) in v.options"
                :key="ind"
                :label="item"
                :value="item"
              ></el-option>
            </el-select>
            <el-date-picker
              v-model="v.value"
              type="date"
              placeholder="选择日期"
              v-if="v.definedType == 7"
              class="aePipt"
              format="yyyy/MM/dd"
            ></el-date-picker>
            <el-cascader
              size="large"
              v-model="v.value"
              :options="AreaList"
              v-if="v.definedType == 10"
              class="aePipt"
            ></el-cascader>
          </el-form-item>
        </template>
        <el-form-item label="参赛号">
          <el-input
            v-model="aePersonForm.entryNumber"
            placeholder="请输入"
            class="aePipt"
          ></el-input>
          <el-button type="text" v-if="aePersonForm.eId != 0" @click="getEntry"
            >生成参赛号</el-button
          >
          <el-tooltip class="item" effect="dark" placement="bottom">
            <div slot="content">
              由系统生成
              <br />需先设置号牌规则 <br />如需分性别请在报名表单中设置性别选项
            </div>
            <i class="el-icon-question"></i>
          </el-tooltip>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="closeAEP">取 消</el-button>
        <el-button type="primary" @click="sureAEPer">确 定</el-button>
      </div>
    </el-dialog>
    <el-dialog
      title="批量生成参赛号"
      :visible.sync="batchEntry"
      width="80%"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :show-close="false"
    >
      <el-form>
        <el-form-item label="选择组别：" required>
          <el-select v-model="batchGid" placeholder="请选择组别">
            <template v-for="(v, i) in groupArr">
              <el-option
                :key="i"
                :label="v.name"
                :value="v.id"
                v-if="v.id != 0"
              ></el-option>
            </template>
          </el-select>
          <div>
            由系统生成，为没有参赛号的选手生成参赛号
            <br />需先设置号牌规则 <br />如需分性别请确保性别已设置
          </div>
        </el-form-item>
      </el-form>
      <div slot="footer">
        <el-button
          @click="
            batchEntry = false;
            batchGid = '';
          "
          >取 消</el-button
        >
        <el-button type="primary" @click="sureBatch">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
var stateArr = [
  { name: "全部", state: -1 },
  { name: "已报名", state: 1 },
  { name: "待支付", state: 0 },
  { name: "待审核", state: 3 },
  { name: "已退赛", state: 5 },
  { name: "审核不通过", state: 4 },
  // { name: "退费中", state: 6 },
  { name: "已取消资格", state: 7, tips: "该账号不可再次报名" },
  { name: "延期,确认参加", state: 9 },
  { name: "延期,保留名额", state: 10 },
  { name: "待退费", state: 11 },
];
var sourceArr = [
  { name: "全部", val: "" },
  { name: "平台报名", val: "S" },
  { name: "其他", val: "e" },
];
var mId = "";
var editBM = "";
import areaList from "../../../assets/area.json";
import table2excel from "js-table2excel";
import temp from "../../../components/temp.vue";
export default {
  components: { temp },
  data() {
    return {
      edit_d_State: false,
      editCon: {},
      playersList: [],
      groupArr: [],
      gId: 0,
      state: 1,
      source: "",
      sourceArr,
      stateArr,
      name: "",
      upUrl: this.$url + "/sbr/upload/applyInfo",
      showUp: false,
      upData: { matchId: "", groupId: "" },
      editState: "",
      currP: 1,
      PageS: 10,
      aePerSonDialog: false,
      aePersonForm: { groupId: "", flist: [], entryNumber: "", eId: 0 },
      AreaList: [],
      batchEntry: false,
      batchGid: "",
    };
  },
  methods: {
    // 展开行 查看信息
    toogleExpand(row) {
      let $table = this.$refs.table;
      $table.toggleRowExpansion(row);
    },
    // 打开修改报名状态弹框
    showDEdit(row) {
      this.editCon = row;
      this.edit_d_State = true;
    },
    // 报名状态修改保存
    saveEdit() {
      if (!this.editState) {
        this.$message.error("请选择状态");
        return false;
      }
      let oo = {
        id: this.editCon.id,
        state: this.editState,
      };
      this.$axios
        .get("/sbr/applyInfo/putApplyInfoState", { params: oo })
        .then((res) => {
          this.getPlayers();
          this.edit_d_State = false;
        });
    },
    // 导入名单按钮下拉
    handleCommand(command) {
      // this.$message("click on item " + command);
      if (command == "b") this.showUp = true;
    },
    // 上传图片
    beforeUpload(file) {
      this.upData.matchId = this.$Base64.decode(
        sessionStorage.getItem("MandA")
      );
      if (!this.upData.groupId) {
        this.$message.error("请选择组别");
        return false;
      }
    },
    upSuccess(res, file) {
      // this.getPlayers()
      // console.log(res.data)
      this.showUp = false;
      this.$message.success("导入成功");
      this.getPlayers();
    },
    // 获取赛项
    getGroupArr() {
      this.$axios
        .get("/sbr/match/getMatchInfos/" + sessionStorage.getItem("MandA"))
        .then((res) => {
          let rr = res.data.data;
          rr.matchInfoLists.unshift({ id: 0, name: "全部" });
          this.groupArr = rr.matchInfoLists;
          this.getPlayers();
        });
    },
    // 获取名单
    getPlayers() {
      let oo = {
        matchId: sessionStorage.getItem("MandA"),
        groupId: this.$Base64.encode(this.gId),
        state: this.state,
        source: this.source,
        name: this.name,
      };
      this.playersList = [];
      this.$axios
        .get("/sbr/applyInfo/getApplyInfoList", { params: oo })
        .then((res) => {
          let rr = res.data.data;
          if (!rr) rr = [];
          rr.forEach((v) => {
            v.stateShow =
              v.state == 1
                ? "已报名"
                : v.state == 0
                ? "待支付"
                : v.state == 3
                ? "待审核"
                : v.state == 5
                ? "已退赛"
                : v.state == 4
                ? "审核不通过"
                : v.state == 6
                ? "退费中"
                : v.state == 7
                ? "已取消资格"
                : "其他";
            v.sourceShow = v.source == "S" ? "平台报名" : "其他";
            v.entryNumber = v.entryNumber ? v.entryNumber : "暂无";
            v["参赛号"] = v.entryNumber;
            v.list = {};
            for (let k in v) {
              if (!v[k]) v[k] = "";
              if (
                k != "matchId" &&
                k != "createDate" &&
                k != "groupId" &&
                k != "source" &&
                k != "openId" &&
                k != "state" &&
                k != "list" &&
                k != "id" &&
                k != "groupName" &&
                k != "teamId"
              ) {
                if (k == "健康证明" || k == "完赛证明") {
                  if (v[k]) v[k] = v[k].split(";");
                  else v[k] = [];
                }
                if (k == "entryNumber") {
                  k = "参赛号";
                  v[k] = v["entryNumber"];
                }
                if (k == "sourceShow") {
                  k = "报名平台";
                  v[k] = v["sourceShow"];
                }
                if (k == "stateShow") {
                  k = "报名状态";
                  v[k] = v["stateShow"];
                }
                if (k == "teamName") {
                  k = "团队/家庭";
                  v[k] = v["teamName"];
                }
                if(k=="remark"){
                   k = "备注";
                  v[k] = v["remark"];
                
                }
                v.list[k] = v[k];
                v[k] = v[k] != null || v[k] != "" ? v[k] : "暂无";
              }
            }
          });
          // console.log(rr);
          this.playersList = rr;
        });
    },
    // 导出提示
    portTips() {
      this.$confirm("导出结果为当前所查询结果，确认导出？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          // this.portData();
          let oo = {
            matchId: sessionStorage.getItem("MandA"),
            groupId: this.$Base64.encode(this.gId),
            state: this.state,
            source: this.source,
            name: this.name,
          };
            this.$axios({
              method:"POST",
              url:'/sbr/applyInfo/exportApplyInfoList',
              data:oo,
              responseType: "blob",
            })
            .then((rr) => {
              // console.log(rr)
              let fileName = rr.headers["content-disposition"]
                .split(";")[1]
                .split("filename=")[1];
              const blob = new Blob([rr.data], {type: 'application/vnd.ms-excel'});
              if (!fileName) fileName = new Date().getTime() + "_导出结果.xlsx";
              else {
                fileName = decodeURI(fileName);
                let tempf = fileName.split(".");
                tempf[0] = new Date().getTime() + "_" + tempf[0] + "_导出结果";
                fileName = tempf.join(".");
              }
              const link = document.createElement("a");
              // console.log(blob)
              link.style.display = "none";
              link.href = URL.createObjectURL(blob);
              link.setAttribute("download", fileName); //下载的文件名以及文件格式
              document.body.appendChild(link);
              link.click();
              document.body.removeChild(link);
            }).catch(e=>{console.log(e)})
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消",
          });
        });
    },
    // 导出
    portData() {
      let column = [];
      let col = this.playersList[0].list;
      for (let k in col) {
        if (k == "健康证明") {
        } else if (k == "完赛证明") {
          // let a = this.playersList.map((v) => {
          //   return v["完赛证明"].length;
          // });
          // console.log(a);
          // var max = Math.max.apply(null, a);
          // // console.log(max)
          // this.playersList.forEach(v=>{})
          // column.push({
          //   title: k,
          //   key: k,
          //   type: "image",
          //     width: 100,
          //     height: 150
          // });
        } else {
          column.push({
            title: k,
            key: k,
            type: "text",
          });
        }
      }
      let n = this.groupArr.find((v) => {
        return v.id == this.gId;
      }).name;
      table2excel(column, this.playersList, n + "报名表.xls");
    },
    /** 添加 / 修改 报名选手信息 ------------------------------------------ */
    // 查询报名信息表单
    getAddForm() {
      let o = { matchId: mId, groupId: this.aePersonForm.groupId };
      this.$axios
        .get("/sbr/match/getMatchInfoSignUp", { params: o })
        .then((res) => {
          let rr = res.data.data;
          if (!rr.form || rr.form.length == 0) {
            rr.form = [
              {
                name: "姓名",
                val: "",
                tip: "",
                definedType: 1,
                must: 1,
              },
              {
                name: "手机号",
                val: "",
                tip: "",
                definedType: 2,
                must: 1,
              },
            ];
          }
          rr.form.forEach((v) => {
            v.value = "";
            v.options = v.val.split("；");
            if (v.definedType == 11) v.value = "身份证";
            if (v.definedType == 5) v.value = "男";
          });
          if (editBM) {
            rr.form.forEach((v) => {
              if (editBM[v.name]) v.value = editBM[v.name];
            });
          }
          this.aePersonForm.flist = rr.form;
        });
    },

    // 省市区选择
    getArea() {
      // 获取JSON省市地区
      let area = areaList.data;
      // console.log(area);
      area.forEach((d) => {
        let objA = {};
        objA.value = d.city_name;
        objA.label = d.city_name;
        if (d.cityArr) {
          objA.children = [];
          d.cityArr.forEach((v) => {
            let objB = {};
            objB.value = v.city_name;
            objB.label = v.city_name;
            if (v.areaArr && v.areaArr.length > 0) {
              objB.children = [];
              v.areaArr.forEach((r) => {
                let objC = {};
                objC.value = r.city_name;
                objC.label = r.city_name;
                objB.children.push(objC);
              });
            }
            objA.children.push(objB);
          });
        }
        this.AreaList.push(objA);
      });
      // console.log(this.AreaList);
    },
    // 确定 添加/修改
    sureAEPer() {
      if (!this.aePersonForm.groupId) {
        this.$message.error("请选择参赛组别");
        return false;
      }
      let list = {};
      this.aePersonForm.flist.forEach((v) => {
        list[v.name] = v.value;
        if(v.name=='健康证明'||v.name=='完赛证明'){
          if(v.value.length>0)list[v.name] = v.value.join(';')
          else list[v.name] =''
        }
      });
      let oo = {
        matchId: mId,
        groupId: this.aePersonForm.groupId,
        entryNumber: this.aePersonForm.entryNumber,
        list: list,
        id: this.aePersonForm.eId,
      };
      this.$axios.post("/sbr/applyInfo/putApplyInfo", oo).then((res) => {
        let rr = res.data.data;
        if (rr) {
          this.$message.error(rr);
        } else {
          this.$message.success("保存成功");
          editBM = "";
          this.getPlayers();
          this.closeAEP();
        }
      });
    },
    closeAEP() {
      editBM = "";
      this.aePersonForm = { groupId: "", flist: [], entryNumber: "", eId: 0 };
      this.aePerSonDialog = false;
    },
    // 展示修改报名信息 弹窗
    showSignEdit(row) {
      this.aePersonForm.eId = row.id;
      this.aePerSonDialog = true;
      this.aePersonForm.groupId = row.groupId;
      this.aePersonForm.entryNumber = row.entryNumber;
      editBM = row;
      this.getAddForm();
    },
    // 自动生成参赛号
    getEntry() {
      if (!this.aePersonForm.groupId) {
        this.$message.error("请选择参赛组别");
        return false;
      }
      let oo = {
        matchId: mId,
        groupId: this.aePersonForm.groupId,
        id: this.aePersonForm.eId,
      };
      this.$axios
        .get("/sbr/applyInfo/getEntryNumber", { params: oo })
        .then((res) => {
          let rr = res.data.data;
          if (rr) this.aePersonForm.entryNumber = rr;
          else this.$message.warning("参赛号生成失败");
        });
    },
    // 批量设置参赛号
    sureBatch() {
      if (!this.batchGid) {
        this.$message.error("请选择赛项");
        return false;
      }
      let o = {
        matchId: mId,
        groupId: this.batchGid,
      };
      this.$axios
        .get("/sbr/applyInfo/putApplyInfoEntryNumberBatch", { params: o })
        .then((res) => {
          let rr = res.data.data;
          this.$message(rr);
          this.getPlayers();
          this.batchEntry = false;
        });
    },
    // 删除选手
    delPer(row) {
      this.$confirm(
        `此操作将删除 ${row["姓名"]} 的报名信息, 是否继续?`,
        "提示",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(() => {
          let o = this.$orgId + "&" + row.id;
          o = this.$Base64.encode(o);
          this.$axios.get("/sbr/applyInfo/delApplyInfo/" + o).then((res) => {
            this.$message({
              type: "success",
              message: "删除成功!",
            });
            this.getPlayers();
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    // 解除绑定关系
    relieve(row) {
      this.$confirm(
        `此操作将解除 ${row["姓名"]} 的绑定关系,解除后需在小程序重新绑定 是否继续?`,
        "提示",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(() => {
          this.$axios
            .get("/sbr/applyInfo/putApplyInfoBinding?id=" + row.id)
            .then((res) => {
              this.$message({
                type: "success",
                message: "解除成功!",
              });
              this.getPlayers();
            });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消",
          });
        });
    },
  },
  created() {
    mId = this.$Base64.decode(sessionStorage.getItem("MandA"));
    mId = Number(mId);
    this.getGroupArr();
    this.getArea();
  },
};
</script>
<style scoped>
/* @import url(); 引入公共css类 */

.pageWrap >>> .el-table__expand-column {
  display: none;
}
.noBot {
  margin-bottom: 0;
}
.conmsg {
  margin-top: 15px;
}
.span {
  padding: 0 12px;
  line-height: 25px;
  display: inline-block;
  cursor: pointer;
  margin-right: 6px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid transparent;
}
.span.active {
  border-color: #409eff;
  border-radius: 12px;
  color: #409eff;
}
.table-expand {
  font-size: 0;
}
.table-expand label {
  width: 90px;
  color: #99a9bf;
}
.table-expand .el-form-item {
  margin-right: 0;
  margin-bottom: 0;
  width: 50%;
}
.jtimg {
  width: 100px;
}
.aePipt {
  max-width: 300px;
}
</style>